<template>
    <div class="test-box">
        <el-row>
            <slot name="a"></slot>
        </el-row>

        <el-row>
            <div>{{field}}</div>
        </el-row>

        <el-row>
            <div>{{ $store.state.count }}</div>
        </el-row>

        <el-row>
            <button @click="$emit('patch', 43)" >PATCH</button>
            <button @click="increment">+</button>
            <button @click="decrement">-</button>
        </el-row>

        <el-row>
            <slot name="b"></slot>
        </el-row>
     
    </div>
</template>

<script>
    import {mapActions} from 'vuex'
    export default {
        name: "test-box",
        props:{
          field:String
        },
        methods:mapActions(['increment', 'decrement']),
    }
</script>

<style lang="less" scoped>
    
</style>
